

import 'dart:convert';

import 'package:flutter_pleasure_video/api/api.dart';
import 'package:flutter_pleasure_video/data/model/yck_rule_model.dart';

class YckMumuceoComApi{
  static String httpUrl="yck.mumuceo.com";


  //获取yck的资源规则
  static Future<List<YckRuleModel>?> getYckRuleList(String url) async {
    if(!(url.contains(httpUrl))){
      return null;
    }
    try{
      List<YckRuleModel> videoList=<YckRuleModel>[];
      Map<String, dynamic> params = {};
      String data = await requestApi(url, params);
      List responseJson = json.decode(data);
      videoList = responseJson.map((m) => new YckRuleModel.fromJson(m)).toList();
      return videoList;
    }catch (e){
      return null;
    }
  }

}